var t = require;
var e = module;
var o = exports;
var i, n = this && this.__extends || (i = function(t, e) {
    return (i = Object.setPrototypeOf || {
        __proto__: []
    }
    instanceof Array &&
    function(t, e) {
        t.__proto__ = e
    } ||
    function(t, e) {
        for (var o in e) Object.prototype.hasOwnProperty.call(e, o) && (t[o] = e[o])
    })(t, e)
},
function(t, e) {
    function o() {
        this.constructor = t
    }
    i(t, e),
    t.prototype = null === e ? Object.create(e) : (o.prototype = e.prototype, new o)
}),
a = this && this.__decorate ||
function(t, e, o, i) {
    var n, a = arguments.length,
    r = a < 3 ? e: null === i ? i = Object.getOwnPropertyDescriptor(e, o) : i;
    if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(t, e, o, i);
    else for (var s = t.length - 1; s >= 0; s--)(n = t[s]) && (r = (a < 3 ? n(r) : a > 3 ? n(e, o, r) : n(e, o)) || r);
    return a > 3 && r && Object.defineProperty(e, o, r),
    r
};
Object.defineProperty(o, "__esModule", {
    value: !0
});
var r = t("SoundManager"),
s = t("BroadCastMessage"),
l = cc._decorator,
c = l.ccclass,
d = l.property,
h = function(t) {
    function e() {
        var e = null !== t && t.apply(this, arguments) || this;
        return e.bgm_hall = null,
        e.btn_click = null,
        e.show_assembly = null,
        e.match = null,
        e.item_pick = null,
        e.item_drop = null,
        e.item_install_fail = null,
        e.item_install_success = null,
        e.item_upgrade = null,
        e.gacha_opening = null,
        e.gacha_opening_part = null,
        e.get_gold = null,
        e
    }
    return n(e, t),
    e.prototype.onLoad = function() {
        s.default.getInstance().RemoveMessage(this),
        s.default.getInstance().RegisterMessage(this)
    },
    e.prototype.onDestroy = function() {
        s.default.getInstance().RemoveMessage(this)
    },
    e.prototype.start = function() {
        this.playMusic(this.bgm_hall)
    },
    e.prototype.playMusic = function(t) {
        r.default.GetInstance().stopAll(),
        this.bgm_hall && r.default.GetInstance().playMusic(t)
    },
    e.prototype.playAudio = function(t) {
        r.default.GetInstance().playSound(this[t])
    },
    a([d(cc.AudioClip)], e.prototype, "bgm_hall", void 0),
    a([d(cc.AudioClip)], e.prototype, "btn_click", void 0),
    a([d(cc.AudioClip)], e.prototype, "show_assembly", void 0),
    a([d(cc.AudioClip)], e.prototype, "match", void 0),
    a([d(cc.AudioClip)], e.prototype, "item_pick", void 0),
    a([d(cc.AudioClip)], e.prototype, "item_drop", void 0),
    a([d(cc.AudioClip)], e.prototype, "item_install_fail", void 0),
    a([d(cc.AudioClip)], e.prototype, "item_install_success", void 0),
    a([d(cc.AudioClip)], e.prototype, "item_upgrade", void 0),
    a([d(cc.AudioClip)], e.prototype, "gacha_opening", void 0),
    a([d(cc.AudioClip)], e.prototype, "gacha_opening_part", void 0),
    a([d(cc.AudioClip)], e.prototype, "get_gold", void 0),
    a([c], e)
} (cc.Component);
o.default = h